package duixiangleixin;

import org.junit.Test;

import java.util.HashMap;

/**
 * @author
 * @Title: StudeyBoolean
 * @Description:
 * @date 2023/9/7 14:35
 */
public class StudeyBoolean {

    @Test
    public void test01(){
        HashMap<String, Boolean> map = new HashMap<>();
        Boolean a = map.get("a");
        boolean b = a;  // a的值是Boolean类型的null, 拆箱后仍就是null, 基本类型的boolean不能是null类型的!!!
    }

    @Test
    public void test02(){
        HashMap<String, Boolean> map = new HashMap<>();
        boolean a = map.get("a");//Boolean类型的null
        System.out.println(a);
    }

}
